package com.zmxstudy.gzu.domain;


import com.zmxstudy.gzu.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController()
@RequestMapping("/test")
public class TestController {



    @Autowired
    public FileRepository fileRepository;

    @GetMapping("/add")
    public Result<File> add() {
        File file = new File();
        file.setId((long)3);
        file.setName("aaaaat");
        file.setNameEn("test1");

//        fileRepository.save(file);

        return Result.success("ok",file);
    }

    // 请自行编写其它测试方法
}